<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>


<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.0/css/jquery.dataTables.css"></link>

<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="/js/jquery.leanModal.min.js"></script>
<link type="text/css" href="/css/start/jquery-ui-1.8.21.custom.css" rel="Stylesheet" />	
<link rel="stylesheet" href="/js/chosen/chosen.css" />
</head>
<body>
<div style="font-family:Arial, Helvetica, sans-serif;" >
<h1>IT Panel</h1>
<form id="form1" name="form1" method="post" action="" enctype="multipart/form-data">
<h3>Testing Link</h3>
<?php $stDetail = new Model_DbTable_Roster_Stafflogindetail();?>
<table border="1" cellspacing="0" cellpadding="5">
		<tr>
			<td colspan = "7" align = "right"><input type = "submit" name = "submit" value = "Submit"></input></td>
		</tr>
	<tr>
		<td>No.</td>
		<td>Link</td>
		<td>Description</td>
		<td>Charge</td>
		<td>Receiver</td>
		<td>Status</td>
		<td>Feedback</td>
		<td>Date</td>
	</tr>
	<?php $i = 1;?>
	<?php foreach ($this->unfinishLink as $k => $v){
				$nick = "";
				if(!empty($v['receiver'])){
					$nickTmp = $stDetail->getDetail($v['receiver']);
					$nick = $nickTmp['ni'];
				}else{
					$nick = "";
				}
		?>
	<tr>
		<td><?php echo $i++;?><input type = "hidden" name = "id_link[<?php echo $v['id_log']?>]" value = "<?php echo $v['id_log'];?>"></input></td>
		<td><a href = "<?php echo $v['link'];?>"><?php echo $v['link']?></a></td>		
		<td><?php echo $v['detail']?></td>
		<td><?php echo $v['staff_name']?></td>
		<td><?php echo $nick?></td>
		<td><select name = "status[<?php echo $v['id_log']?>]">
			<option <?php if ($v['status'] != 'CODE' && $v['status'] != 'WAIT' && $v['status'] != 'COMPLETE') {?>selected <?php }?>disabled>Please Select</option>
			<option value = "CODE" <?php if ($v['status'] == 'CODE'){?>selected<?php }?>>Coding</option>
			<option value = "WAIT" <?php if ($v['status'] == 'WAIT'){?>selected<?php }?>>Waiting feedback</option>
			<option value = "REVISION" <?php if ($v['status'] == 'REVISION'){?>selected<?php }?>>Revision</option>
			<option value = "COMPLETE" <?php if ($v['status'] == 'COMPLETE'){?>selected<?php }?>>Completed</option>
		</select></td>
		<td><input type = "text" name = "fb[<?php echo $v['id_log']?>]" value = "<?php echo $v['feedback']?>"></input></td>
		<td><?php echo $v['feedback_date']?></td>
	</tr>	
	<?php }?>
</table>

<br />
<h3>Completed Link</h3>
<table border="1" cellspacing="0" cellpadding="5">
		<tr>
			<td colspan = "7" align = "right"><input type = "submit" name = "Assign" value = "Assign"></input></td>
		</tr>
	<tr>
		<td>No.</td>
		<td>Link</td>
		<td>Description</td>
		<td>Charge</td>
		<td>Assign Department</td>
		<td>Assign Result</td>
		<td>Date</td>
	</tr>
	<?php $i = 1;?>
	<?php foreach ($this->finishLink as $k => $v){?>
	<tr>
		<td><?php echo $i++;?><input type = "hidden" name = "fin_link[<?php echo $v['id_log']?>]" value = "<?php echo $v['id_log'];?>"></input></td>
		<td><a href = "<?php echo $v['link'];?>"><?php echo $v['link']?></a></td>		
		<td><?php echo $v['detail']?></td>
		<td><?php echo $v['staff_name']?></td>
		<td><?php if(!empty($v['department'])){
				echo $v['department'];
		}else{ ?>
				<select name = "depart[<?php echo $v['id_log']?>]">
					<option selected disabled>Please Select</option>
					<option value = "Accounts">Accounts</option>
					<option value = "Admin">Admin</option>
					<option value = "Warehouse">Warehouse</option>
					<option value = "Shop">Shop</option>
				
				</select>
		<?php }?></td>
		<td><?php if(!empty($v['assign'])){ echo "<img src='/im/yes20.jpg' />";}else{echo "<img src='/im/no20.jpg' />";}?></td>
		<td><?php echo $v['feedback_date']?></td>
	</tr>	
	<?php }?>
</table>
</form>
</div>
<div style=" font-size:10px; color:#666;float:right;" >Developer:Leo,Date:2015-02-20,ver:1.01</div>
</body>
</html>